package com.angel.architecture.daos.impl;

import java.util.Collection;

import com.angel.architecture.daos.RoleDAO;
import com.angel.architecture.persistence.beans.Action;
import com.angel.architecture.persistence.beans.Role;
import com.angel.architecture.persistence.ids.ObjectId;
import com.angel.dao.generic.impl.GenericSpringHibernateDAO;

public class RoleSpringHibernateDAO extends GenericSpringHibernateDAO<Role, ObjectId> implements RoleDAO {

    public RoleSpringHibernateDAO(){
        super(Role.class, ObjectId.class);
    }

    public Collection<Role> findAllByAccion(Action action) {
        return super.findAll("action", action);
    }

    public Collection<Role> findAllByDescription(String description) {
        return super.findAll("description", description);
    }

    public Role findUniqueByName(String name){
        return super.findUnique("name", name);
    }
}
